<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>

<s:layout-render name="/layout.jsp" titlekey="admin.title">
    <s:layout-component name="body">
        <s:useActionBean beanclass="cz.muni.fi.pa165.dundd.web.AdminActionBean" var="actionBean"/>
        <h1 class="title" id="page-title"><f:message key="admin.title"/></h1>
        <div class="content">
            <div class="node node-page clearfix">   <h2><f:message key="admin.list.showAdmins"/></h2>
                <table class="basic">
                    <tr>
                        <th><h4>Id</h4></th>
                    <th><h4><f:message key="admin.list.name"/></h4></th>
                    <th><h4><f:message key="admin.list.desc"/></h4></th>
                    <th></th>
                    <th></th>
                    </tr>
                    <c:forEach items="${actionBean.admins}" var="admin">
                        <tr>
                            <td><h6><c:out value="${admin.id}"/></h6></td>
                            <td><h6><c:out value="${admin.name}"/></h6></td>
                            <td><h6><c:out value="${admin.description}"/></h6></td>
                            <td>
                                <s:form beanclass="cz.muni.fi.pa165.dundd.web.AdminActionBean">
                                    <s:hidden name="admin.id" value="${admin.id}"/>
                                    <s:submit name="edit" ><f:message key="admin.list.edit"/></s:submit>
                                </s:form>
                            </td>
                            <td>
                                <s:form beanclass="cz.muni.fi.pa165.dundd.web.AdminActionBean">
                                    <s:hidden name="admin.id" value="${admin.id}"/>
                                    <s:submit name="delete" ><f:message key="admin.list.delete"/></s:submit>
                                </s:form>
                            </td>
                        </tr>
                    </c:forEach>
                </table>
            </div>
        </div>
<!--        <div class="content">
            <div class="node node-page clearfix"> <h2><f:message key="admin.list.newadmin"/></h2>
                <s:form beanclass="cz.muni.fi.pa165.dundd.web.AdminActionBean">
                    <%@include file="form.jsp"%>
                    <s:submit name="add"><f:message key="admin.list.create"/>
                    </s:submit>
                    </fieldset>
                </s:form>
            </div>
        </div>-->
    </s:layout-component>
</s:layout-render>